<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>用户列表</title>
    <link rel="stylesheet" href="../assets/lib/layui/css/layui.css" />
    <link rel="stylesheet" href="../assets/css/user/user.css" />
  </head>
  <body>
    <div class="layui-card">
      <div class="layui-card-header">用户列表</div>
      <div class="layui-card-body">
        <table class="layui-table">
          <colgroup>
            <col width="80" />
            <col width="300" />
            <col width="250" />
            <col width="220" />
            <col />
          </colgroup>
          <thead>
            <tr>
              <th>ID</th>
              <th>账号名称</th>
              <th>昵称</th>
              <th>邮箱</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody></tbody>
        </table>
        <div id="page"></div>
      </div>
    </div>
    <script type="text/html" id="userInfo">
      {{each data as v }}
      <tr>
        <td>{{v.id}}</td>
        <td>{{v.username}}</td>
        <td>{{v.nickname}}</td>
        <td>{{v.email}}</td>
        <td>
          <button id="editBtn" type="button" class="layui-btn layui-btn-xs">
            编辑
          </button>
          <button
            id="delBtn"
            data-id="{{v.id}}"
            type="button"
            class="layui-btn layui-btn-xs layui-btn-danger"
          >
            删除
          </button>
          <button
            id="resetPwd"
            type="button"
            class="layui-btn layui-btn-xs layui-btn-normal"
          >
            重置密码
          </button>
        </td>
      </tr>
      {{/each}}
    </script>
    <script type="text/html" id="rePwd-tpl">
      <form id="rePwd" class="layui-form" lay-filter="rePwd">
        <div class="layui-form-item">
          <label class="layui-form-label">密码</label>
          <div class="layui-input-block">
            <input
              type="password"
              name="password"
              required
              lay-verify="required"
              placeholder="请输入密码"
              autocomplete="off"
              class="layui-input"
            />
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">确认密码</label>
          <div class="layui-input-block">
            <input
              type="password"
              name="rePwd"
              placeholder="请输入确认密码"
              autocomplete="off"
              class="layui-input"
            />
          </div>
        </div>

        <div class="layui-form-item">
          <div class="layui-input-block">
            <button id="btn" class="layui-btn" lay-submit lay-filter="formDemo">
              立即提交
            </button>
            <button type="reset" id="reset" class="layui-btn layui-btn-primary">
              重置
            </button>
          </div>
        </div>
      </form>
    </script>
    <script src="../assets/lib/jquery.js"></script>
    <script src="../assets/lib/layui/layui.all.js"></script>
    <script src="../assets/lib/template-web.js"></script>
    <script src="../assets/js/common.js"></script>
    <script src="../assets/js/user/user.js"></script>
  </body>
</html>
